﻿using System.Linq;
using System.Windows;
using kursovaya.Data.Context;

namespace kursovaya.Windows
{
    public partial class AccountingWindow : Window
    {
        public AccountingWindow()
        {
            InitializeComponent();
            LoadInventory();
            LoadTecnician();
        }
        
        private void LoadInventory()
        {
            using (var context = new DbContext())
            {
                var inventoryes = context.Inventoryes.ToList();
                InventoryDataGrid.ItemsSource = inventoryes;
            }
        }
        private void LoadTecnician()
        {
            using (var context = new DbContext())
            {
                var technicians = context.Technicians.ToList();
                TecniciansDataGrid.ItemsSource = technicians;
            }
        }
    }
}